clf;

colormap('default');

y = -0.4:0.05:0.4;
x = -1.5:0.1:1.5;
z = 0:0.1:2*pi;

zzz = meshgrid(x, y, z);


for i = 1 : length(x(1, :))
	for j = 1: length(y(1, :))
		for k = 1 : length(z(1, :))	
			zzz(i ,j, k) = polynom1(x(i), y(j), z(k));
		endfor
	endfor	
endfor

%contour(x, y, z, [0 0]);

X0 = 0
Y0 = 0
Z0 = -60

initialVector = [ X0, Y0, Z0];
StartT = 0;
StopT = 1000;
vopt = odeset ("RelTol", 1e-8, "AbsTol", 1e-8, "NormControl", "on", "InitialStep", 0.1, "MaxStep", 10);
[T,Result] = ode45( @systemm,[StartT, StopT], initialVector, vopt);
figure(1)
plot3(Result(:,1), Result(:,2),Result(:,3),'-');
xlabel("x");
ylabel("y")
zlabel("z")

figure(2)
 isosurface (zzz, 0);
 axis equal;
 title ('isosurface of a sphere');
